package com.example.admin.model;

import com.example.admin.utils.CodeToName;
import org.springframework.util.StringUtils;

import java.util.Objects;

public class Person {

    private String custID;

    private String name;

    private String age;

    @CodeToName(codeClsType = "CHIBUBAO", codeNameFiled = "吃不饱")
    private String sex;

//    private String sexName;

    private Integer index;

    private String time;

    private String startTime;
    private String endTime;

    public String getCustID() {
        return custID;
    }

    public void setCustID(String custID) {
        this.custID = custID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
//        if (!StringUtils.isEmpty(age)) {
//            age = age + "岁";
//        }
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

//    public String getSexName() {
//        sexName = StandardCodeNameUtil.sex.get(sex);
//        return sexName;
//    }

//    public void setSexName(String sexName) {
//        this.sexName = sexName;
//    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    @Override
    public String toString() {
        return "Person{" +
                "custID='" + custID + '\'' +
                ", name='" + name + '\'' +
                ", age='" + age + '\'' +
                ", sex='" + sex + '\'' +
                ", index=" + index +
                ", time='" + time + '\'' +
                ", startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                '}';
    }

    //    @Override
//    public boolean equals(Object o) {
//        if (this == o) return true;
//        if (o == null || getClass() != o.getClass()) return false;
//        Person person = (Person) o;
//        return age == person.age &&
//                Objects.equals(name, person.name);
//    }
//
//    @Override
//    public int hashCode() {
//        return Objects.hash(name, age);
//    }
}
